#ifndef FILE_H
#define FILE_H

#include "StringUtilities.h"
#include "OOBB.h"
#include "MazeTypes.h"
//#include "SmartPtr.h"

#include <string>
#include <iostream>
#include <vector>
#include <assert.h>
#include <fstream>
#include <D3DX11.h>
#include <D3DX10math.h>

using namespace std;

class File// : public RefCounted
{
public:
	bool OpenRead(const string& filename);
	bool OpenRead(const wstring& filename);

	bool GetInteger(int* result);
	bool GetFloat(float* result);
	bool GetString(string* result);
	bool GetD3DXVECTOR3(D3DXVECTOR3* result);
	bool GetD3DXVECTOR2(D3DXVECTOR2* result);
	bool GetOOBB2(OOBB2* result);
	bool GetOOBB3(OOBB3* result);
	bool GetVectorI(std::vector<int>* result);
	bool GetRoomSizes(std::map<int, RoomSize>* result);
	bool GetVectorConRooms(std::vector<CellPosition>* result);
	
	bool EndOfFile();
	bool CloseFile(const string& filename);
private:
	ifstream m_file;
	bool m_blockComment;

};

//typedef SmartPtr<File> PFile;

#endif FILE_H